<!-- 图片配置 -->
<template>
  <div style="margin-top: 16px">
    <el-form-item label="开启旋转">
      <el-switch v-model="myConfig.rotate" class="float_right"></el-switch>
    </el-form-item>
    <el-form-item :label="$t('透明度')" class="form_item_margin">
      <el-slider
        v-model="myConfig.opacity"
        :show-tooltip="false"
        class="slider136 r_margin_right8"
      ></el-slider>
      <el-input
        v-model.number="myConfig.opacity"
        class="r_56width"
        oninput="value=value.replace(/[^\d]/g,'')"
      >
        <span slot="suffix" style="line-height: 32px">%</span>
      </el-input>
    </el-form-item>
    <template v-if="myConfig.rotate">
      <el-form-item label="旋转时间">
        <el-input-number v-model="myConfig.duration" controls-position="right">
        </el-input-number>
      </el-form-item>
    </template>
    <el-form-item label="图片选择" style="margin-bottom: 8px">
      <l-img-select v-model="main.activeObj.option.data.value" />
    </el-form-item>
  </div>
</template>

<script>
export default {
  props: {
    config: {
      type: Object,
      default: () => ({}),
    },
  },
  inject: ["main"],
  computed: {
    myConfig() {
      return this.config;
    },
  },
};
</script>

<style>
</style>